package com.hmall.client;

import com.hmall.common.pojo.Address;
import com.hmall.common.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description:
 * @Author: 315QK
 * @Date: 2021/12/21/13:45
 */
@FeignClient("userservice")
public interface UserClient {
    @GetMapping("/address/a/{addressId}")
    Address getAddress(@PathVariable("addressId")Integer addressId , @RequestParam("userId") Long id);

    @GetMapping("/user/get")
    User getUser(@RequestParam Long userId);

    @GetMapping("user/pay")
    void changeBalace(@RequestParam Long newBalace,@RequestParam Long userId);
}
